<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>Lexical Scanner</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.73.2">
<link rel="start" href="index.html" title="GLib Reference Manual">
<link rel="up" href="glib-utilities.html" title="GLib Utilities">
<link rel="prev" href="glib-Miscellaneous-Utility-Functions.html" title="Miscellaneous Utility Functions">
<link rel="next" href="glib-Automatic-String-Completion.html" title="Automatic String Completion">
<meta name="generator" content="GTK-Doc V1.9 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
<link rel="chapter" href="glib.html" title="GLib Overview">
<link rel="chapter" href="glib-fundamentals.html" title="GLib Fundamentals">
<link rel="chapter" href="glib-core.html" title="GLib Core Application Support">
<link rel="chapter" href="glib-utilities.html" title="GLib Utilities">
<link rel="chapter" href="glib-data-types.html" title="GLib Data Types">
<link rel="chapter" href="tools.html" title="GLib Tools">
<link rel="index" href="ix01.html" title="Index">
<link rel="index" href="ix02.html" title="Index of deprecated symbols">
<link rel="index" href="ix03.html" title="Index of new symbols in 2.2">
<link rel="index" href="ix04.html" title="Index of new symbols in 2.4">
<link rel="index" href="ix05.html" title="Index of new symbols in 2.6">
<link rel="index" href="ix06.html" title="Index of new symbols in 2.8">
<link rel="index" href="ix07.html" title="Index of new symbols in 2.10">
<link rel="index" href="ix08.html" title="Index of new symbols in 2.12">
<link rel="index" href="ix09.html" title="Index of new symbols in 2.14">
<link rel="index" href="ix10.html" title="Index of new symbols in 2.16">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
<tr valign="middle">
<td><a accesskey="p" href="glib-Miscellaneous-Utility-Functions.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
<td><a accesskey="u" href="glib-utilities.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
<th width="100%" align="center">GLib Reference Manual</th>
<td><a accesskey="n" href="glib-Automatic-String-Completion.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
</tr>
<tr><td colspan="5" class="shortcuts"><nobr><a href="#id3137027" class="shortcut">Top</a>
                  &#160;|&#160;
                  <a href="#id3137886" class="shortcut">Description</a></nobr></td></tr>
</table>
<div class="refentry" lang="en">
<a name="glib-Lexical-Scanner"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2>
<a name="id3137027"></a><span class="refentrytitle">Lexical Scanner</span>
</h2>
<p>Lexical Scanner &#8212; a general purpose lexical scanner</p>
</td>
<td valign="top" align="right"></td>
</tr></table></div>
<div class="refsynopsisdiv">
<h2>Synopsis</h2>
<pre class="synopsis">

#include &lt;glib.h&gt;


                    <a class="link" href="glib-Lexical-Scanner.html#GScanner">GScanner</a>;
                    <a class="link" href="glib-Lexical-Scanner.html#GScannerConfig">GScannerConfig</a>;
<a class="link" href="glib-Lexical-Scanner.html#GScanner">GScanner</a>*           <a class="link" href="glib-Lexical-Scanner.html#g-scanner-new">g_scanner_new</a>                       (const <a class="link" href="glib-Lexical-Scanner.html#GScannerConfig">GScannerConfig</a> *config_templ);
void                <a class="link" href="glib-Lexical-Scanner.html#g-scanner-destroy">g_scanner_destroy</a>                   (<a class="link" href="glib-Lexical-Scanner.html#GScanner">GScanner</a> *scanner);

void                <a class="link" href="glib-Lexical-Scanner.html#g-scanner-input-file">g_scanner_input_file</a>                (<a class="link" href="glib-Lexical-Scanner.html#GScanner">GScanner</a> *scanner,
                                                         <a class="link" href="glib-Basic-Types.html#gint">gint</a> input_fd);
void                <a class="link" href="glib-Lexical-Scanner.html#g-scanner-sync-file-offset">g_scanner_sync_file_offset</a>          (<a class="link" href="glib-Lexical-Scanner.html#GScanner">GScanner</a> *scanner);
void                <a class="link" href="glib-Lexical-Scanner.html#g-scanner-input-text">g_scanner_input_text</a>                (<a class="link" href="glib-Lexical-Scanner.html#GScanner">GScanner</a> *scanner,
                                                         const <a class="link" href="glib-Basic-Types.html#gchar">gchar</a> *text,
                                                         <a class="link" href="glib-Basic-Types.html#guint">guint</a> text_len);
<a class="link" href="glib-Lexical-Scanner.html#GTokenType">GTokenType</a>          <a class="link" href="glib-Lexical-Scanner.html#g-scanner-peek-next-token">g_scanner_peek_next_token</a>           (<a class="link" href="glib-Lexical-Scanner.html#GScanner">GScanner</a> *scanner);
<a class="link" href="glib-Lexical-Scanner.html#GTokenType">GTokenType</a>          <a class="link" href="glib-Lexical-Scanner.html#g-scanner-get-next-token">g_scanner_get_next_token</a>            (<a class="link" href="glib-Lexical-Scanner.html#GScanner">GScanner</a> *scanner);
<a class="link" href="glib-Basic-Types.html#gboolean">gboolean</a>            <a class="link" href="glib-Lexical-Scanner.html#g-scanner-eof">g_scanner_eof</a>                       (<a class="link" href="glib-Lexical-Scanner.html#GScanner">GScanner</a> *scanner);

<a class="link" href="glib-Basic-Types.html#guint">guint</a>               <a class="link" href="glib-Lexical-Scanner.html#g-scanner-cur-line">g_scanner_cur_line</a>                  (<a class="link" href="glib-Lexical-Scanner.html#GScanner">GScanner</a> *scanner);
<a class="link" href="glib-Basic-Types.html#guint">guint</a>               <a class="link" href="glib-Lexical-Scanner.html#g-scanner-cur-position">g_scanner_cur_position</a>              (<a class="link" href="glib-Lexical-Scanner.html#GScanner">GScanner</a> *scanner);
<a class="link" href="glib-Lexical-Scanner.html#GTokenType">GTokenType</a>          <a class="link" href="glib-Lexical-Scanner.html#g-scanner-cur-token">g_scanner_cur_token</a>                 (<a class="link" href="glib-Lexical-Scanner.html#GScanner">GScanner</a> *scanner);
<a class="link" href="glib-Lexical-Scanner.html#GTokenValue">GTokenValue</a>         <a class="link" href="glib-Lexical-Scanner.html#g-scanner-cur-value">g_scanner_cur_value</a>                 (<a class="link" href="glib-Lexical-Scanner.html#GScanner">GScanner</a> *scanner);

<a class="link" href="glib-Basic-Types.html#guint">guint</a>               <a class="link" href="glib-Lexical-Scanner.html#g-scanner-set-scope">g_scanner_set_scope</a>                 (<a class="link" href="glib-Lexical-Scanner.html#GScanner">GScanner</a> *scanner,
                                                         <a class="link" href="glib-Basic-Types.html#guint">guint</a> scope_id);
void                <a class="link" href="glib-Lexical-Scanner.html#g-scanner-scope-add-symbol">g_scanner_scope_add_symbol</a>          (<a class="link" href="glib-Lexical-Scanner.html#GScanner">GScanner</a> *scanner,
                                                         <a class="link" href="glib-Basic-Types.html#guint">guint</a> scope_id,
                                                         const <a class="link" href="glib-Basic-Types.html#gchar">gchar</a> *symbol,
                                                         <a class="link" href="glib-Basic-Types.html#gpointer">gpointer</a> value);
void                <a class="link" href="glib-Lexical-Scanner.html#g-scanner-scope-foreach-symbol">g_scanner_scope_foreach_symbol</a>      (<a class="link" href="glib-Lexical-Scanner.html#GScanner">GScanner</a> *scanner,
                                                         <a class="link" href="glib-Basic-Types.html#guint">guint</a> scope_id,
                                                         <a class="link" href="glib-Hash-Tables.html#GHFunc">GHFunc</a> func,
                                                         <a class="link" href="glib-Basic-Types.html#gpointer">gpointer</a> user_data);
<a class="link" href="glib-Basic-Types.html#gpointer">gpointer</a>            <a class="link" href="glib-Lexical-Scanner.html#g-scanner-scope-lookup-symbol">g_scanner_scope_lookup_symbol</a>       (<a class="link" href="glib-Lexical-Scanner.html#GScanner">GScanner</a> *scanner,
                                                         <a class="link" href="glib-Basic-Types.html#guint">guint</a> scope_id,
                                                         const <a class="link" href="glib-Basic-Types.html#gchar">gchar</a> *symbol);
void                <a class="link" href="glib-Lexical-Scanner.html#g-scanner-scope-remove-symbol">g_scanner_scope_remove_symbol</a>       (<a class="link" href="glib-Lexical-Scanner.html#GScanner">GScanner</a> *scanner,
                                                         <a class="link" href="glib-Basic-Types.html#guint">guint</a> scope_id,
                                                         const <a class="link" href="glib-Basic-Types.html#gchar">gchar</a> *symbol);
#define             <a class="link" href="glib-Lexical-Scanner.html#g-scanner-add-symbol">g_scanner_add_symbol</a>                ( scanner, symbol, value )
#define             <a class="link" href="glib-Lexical-Scanner.html#g-scanner-remove-symbol">g_scanner_remove_symbol</a>             ( scanner, symbol )
#define             <a class="link" href="glib-Lexical-Scanner.html#g-scanner-foreach-symbol">g_scanner_foreach_symbol</a>            ( scanner, func, data )

#define             <a class="link" href="glib-Lexical-Scanner.html#g-scanner-freeze-symbol-table">g_scanner_freeze_symbol_table</a>       (scanner)
#define             <a class="link" href="glib-Lexical-Scanner.html#g-scanner-thaw-symbol-table">g_scanner_thaw_symbol_table</a>         (scanner)
<a class="link" href="glib-Basic-Types.html#gpointer">gpointer</a>            <a class="link" href="glib-Lexical-Scanner.html#g-scanner-lookup-symbol">g_scanner_lookup_symbol</a>             (<a class="link" href="glib-Lexical-Scanner.html#GScanner">GScanner</a> *scanner,
                                                         const <a class="link" href="glib-Basic-Types.html#gchar">gchar</a> *symbol);

void                <a class="link" href="glib-Lexical-Scanner.html#g-scanner-warn">g_scanner_warn</a>                      (<a class="link" href="glib-Lexical-Scanner.html#GScanner">GScanner</a> *scanner,
                                                         const <a class="link" href="glib-Basic-Types.html#gchar">gchar</a> *format,
                                                         ...);
void                <a class="link" href="glib-Lexical-Scanner.html#g-scanner-error">g_scanner_error</a>                     (<a class="link" href="glib-Lexical-Scanner.html#GScanner">GScanner</a> *scanner,
                                                         const <a class="link" href="glib-Basic-Types.html#gchar">gchar</a> *format,
                                                         ...);
void                <a class="link" href="glib-Lexical-Scanner.html#g-scanner-unexp-token">g_scanner_unexp_token</a>               (<a class="link" href="glib-Lexical-Scanner.html#GScanner">GScanner</a> *scanner,
                                                         <a class="link" href="glib-Lexical-Scanner.html#GTokenType">GTokenType</a> expected_token,
                                                         const <a class="link" href="glib-Basic-Types.html#gchar">gchar</a> *identifier_spec,
                                                         const <a class="link" href="glib-Basic-Types.html#gchar">gchar</a> *symbol_spec,
                                                         const <a class="link" href="glib-Basic-Types.html#gchar">gchar</a> *symbol_name,
                                                         const <a class="link" href="glib-Basic-Types.html#gchar">gchar</a> *message,
                                                         <a class="link" href="glib-Basic-Types.html#gint">gint</a> is_error);
void                (<a class="link" href="glib-Lexical-Scanner.html#GScannerMsgFunc">*GScannerMsgFunc</a>)                  (<a class="link" href="glib-Lexical-Scanner.html#GScanner">GScanner</a> *scanner,
                                                         <a class="link" href="glib-Basic-Types.html#gchar">gchar</a> *message,
                                                         <a class="link" href="glib-Basic-Types.html#gboolean">gboolean</a> error);

#define             <a class="link" href="glib-Lexical-Scanner.html#G-CSET-a-2-z">G_CSET_a_2_z</a>
#define             <a class="link" href="glib-Lexical-Scanner.html#G-CSET-A-2-Z:CAPS">G_CSET_A_2_Z</a>
#define             <a class="link" href="glib-Lexical-Scanner.html#G-CSET-DIGITS:CAPS">G_CSET_DIGITS</a>
#define             <a class="link" href="glib-Lexical-Scanner.html#G-CSET-LATINC:CAPS">G_CSET_LATINC</a>
#define             <a class="link" href="glib-Lexical-Scanner.html#G-CSET-LATINS:CAPS">G_CSET_LATINS</a>
enum                <a class="link" href="glib-Lexical-Scanner.html#GTokenType">GTokenType</a>;
union               <a class="link" href="glib-Lexical-Scanner.html#GTokenValue">GTokenValue</a>;
enum                <a class="link" href="glib-Lexical-Scanner.html#GErrorType">GErrorType</a>;
</pre>
</div>
<div class="refsect1" lang="en">
<a name="id3137886"></a><h2>Description</h2>
<p>
The <a class="link" href="glib-Lexical-Scanner.html#GScanner"><span class="type">GScanner</span></a> and its associated functions provide a general purpose
lexical scanner.
</p>
</div>
<div class="refsect1" lang="en">
<a name="id3137915"></a><h2>Details</h2>
<div class="refsect2" lang="en">
<a name="id3137925"></a><h3>
<a name="GScanner"></a>GScanner</h3>
<a class="indexterm" name="id3137937"></a><pre class="programlisting">typedef struct {
  /* unused fields */
  gpointer		user_data;
  guint			max_parse_errors;
  
  /* g_scanner_error() increments this field */
  guint			parse_errors;
  
  /* name of input stream, featured by the default message handler */
  const gchar		*input_name;
  
  /* quarked data */
  GData			*qdata;
  
  /* link into the scanner configuration */
  GScannerConfig	*config;
  
  /* fields filled in after g_scanner_get_next_token() */
  GTokenType		token;
  GTokenValue		value;
  guint			line;
  guint			position;
  
  /* fields filled in after g_scanner_peek_next_token() */
  GTokenType		next_token;
  GTokenValue		next_value;
  guint			next_line;
  guint			next_position;
  
  /* to be considered private */
  GHashTable		*symbol_table;
  gint			input_fd;
  const gchar		*text;
  const gchar		*text_end;
  gchar			*buffer;
  guint			scope_id;
  
  /* handler function for _warn and _error */
  GScannerMsgFunc	msg_handler;
} GScanner;
</pre>
<p>
The data structure representing a lexical scanner.
</p>
<p>
You should set <em class="structfield"><code>input_name</code></em> after creating 
the scanner, since it is used by the default message handler when 
displaying warnings and errors. If you are scanning a file, the file 
name would be a good choice.
</p>
<p>
The <em class="structfield"><code>user_data</code></em> and
<em class="structfield"><code>max_parse_errors</code></em> fields are not used.
If you need to associate extra data with the scanner you can place them here.
</p>
<p>
If you want to use your own message handler you can set the
<em class="structfield"><code>msg_handler</code></em> field. The type of the message
handler function is declared by <a class="link" href="glib-Lexical-Scanner.html#GScannerMsgFunc"><span class="type">GScannerMsgFunc</span></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><a class="link" href="glib-Basic-Types.html#gpointer">gpointer</a>&#160;<em class="structfield"><code>user_data</code></em>;</span></p></td>
<td>
</td>
</tr>
<tr>
<td><p><span class="term"><a class="link" href="glib-Basic-Types.html#guint">guint</a>&#160;<em class="structfield"><code>max_parse_errors</code></em>;</span></p></td>
<td>
</td>
</tr>
<tr>
<td><p><span class="term"><a class="link" href="glib-Basic-Types.html#guint">guint</a>&#160;<em class="structfield"><code>parse_errors</code></em>;</span></p></td>
<td>
</td>
</tr>
<tr>
<td><p><span class="term">const&#160;<a class="link" href="glib-Basic-Types.html#gchar">gchar</a>&#160;*<em class="structfield"><code>input_name</code></em>;</span></p></td>
<td>
</td>
</tr>
<tr>
<td><p><span class="term"><a class="link" href="glib-Keyed-Data-Lists.html#GData">GData</a>&#160;*<em class="structfield"><code>qdata</code></em>;</span></p></td>
<td>
</td>
</tr>
<tr>
<td><p><span class="term"><a class="link" href="glib-Lexical-Scanner.html#GScannerConfig">GScannerConfig</a>&#160;*<em class="structfield"><code>config</code></em>;</span></p></td>
<td>
</td>
</tr>
<tr>
<td><p><span class="term"><a class="link" href="glib-Lexical-Scanner.html#GTokenType">GTokenType</a>&#160;<em class="structfield"><code>token</code></em>;</span></p></td>
<td>      token parsed by the last <a class="link" href="glib-Lexical-Scanner.html#g-scanner-get-next-token"><code class="function">g_scanner_get_next_token()</code></a>
</td>
</tr>
<tr>
<td><p><span class="term"><a class="link" href="glib-Lexical-Scanner.html#GTokenValue">GTokenValue</a>&#160;<em class="structfield"><code>value</code></em>;</span></p></td>
<td>      value of the last token from <a class="link" href="glib-Lexical-Scanner.html#g-scanner-get-next-token"><code class="function">g_scanner_get_next_token()</code></a>
</td>
</tr>
<tr>
<td><p><span class="term"><a class="link" href="glib-Basic-Types.html#guint">guint</a>&#160;<em class="structfield"><code>line</code></em>;</span></p></td>
<td>       line number of the last token from <a class="link" href="glib-Lexical-Scanner.html#g-scanner-get-next-token"><code class="function">g_scanner_get_next_token()</code></a>
</td>
</tr>
<tr>
<td><p><span class="term"><a class="link" href="glib-Basic-Types.html#guint">guint</a>&#160;<em class="structfield"><code>position</code></em>;</span></p></td>
<td>   char number of the last token from <a class="link" href="glib-Lexical-Scanner.html#g-scanner-get-next-token"><code class="function">g_scanner_get_next_token()</code></a>
</td>
</tr>
<tr>
<td><p><span class="term"><a class="link" href="glib-Lexical-Scanner.html#GTokenType">GTokenType</a>&#160;<em class="structfield"><code>next_token</code></em>;</span></p></td>
<td>   token parsed by the last <a class="link" href="glib-Lexical-Scanner.html#g-scanner-peek-next-token"><code class="function">g_scanner_peek_next_token()</code></a>
</td>
</tr>
<tr>
<td><p><span class="term"><a class="link" href="glib-Lexical-Scanner.html#GTokenValue">GTokenValue</a>&#160;<em class="structfield"><code>next_value</code></em>;</span></p></td>
<td>   value of the last token from <a class="link" href="glib-Lexical-Scanner.html#g-scanner-peek-next-token"><code class="function">g_scanner_peek_next_token()</code></a>
</td>
</tr>
<tr>
<td><p><span class="term"><a class="link" href="glib-Basic-Types.html#guint">guint</a>&#160;<em class="structfield"><code>next_line</code></em>;</span></p></td>
<td>    line number of the last token from <a class="link" href="glib-Lexical-Scanner.html#g-scanner-peek-next-token"><code class="function">g_scanner_peek_next_token()</code></a>
</td>
</tr>
<tr>
<td><p><span class="term"><a class="link" href="glib-Basic-Types.html#guint">guint</a>&#160;<em class="structfield"><code>next_position</code></em>;</span></p></td>
<td>char number of the last token from <a class="link" href="glib-Lexical-Scanner.html#g-scanner-peek-next-token"><code class="function">g_scanner_peek_next_token()</code></a>
</td>
</tr>
<tr>
<td><p><span class="term"><a class="link" href="glib-Hash-Tables.html#GHashTable">GHashTable</a>&#160;*<em class="structfield"><code>symbol_table</code></em>;</span></p></td>
<td>
</td>
</tr>
<tr>
<td><p><span class="term"><a class="link" href="glib-Basic-Types.html#gint">gint</a>&#160;<em class="structfield"><code>input_fd</code></em>;</span></p></td>
<td>
</td>
</tr>
<tr>
<td><p><span class="term">const&#160;<a class="link" href="glib-Basic-Types.html#gchar">gchar</a>&#160;*<em class="structfield"><code>text</code></em>;</span></p></td>
<td>
</td>
</tr>
<tr>
<td><p><span class="term">const&#160;<a class="link" href="glib-Basic-Types.html#gchar">gchar</a>&#160;*<em class="structfield"><code>text_end</code></em>;</span></p></td>
<td>
</td>
</tr>
<tr>
<td><p><span class="term"><a class="link" href="glib-Basic-Types.html#gchar">gchar</a>&#160;*<em class="structfield"><code>buffer</code></em>;</span></p></td>
<td>
</td>
</tr>
<tr>
<td><p><span class="term"><a class="link" href="glib-Basic-Types.html#guint">guint</a>&#160;<em class="structfield"><code>scope_id</code></em>;</span></p></td>
<td>
</td>
</tr>
<tr>
<td><p><span class="term"><a class="link" href="glib-Lexical-Scanner.html#GScannerMsgFunc">GScannerMsgFunc</a>&#160;<em class="structfield"><code>msg_handler</code></em>;</span></p></td>
<td>function to handle GScanner message output

</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3138533"></a><h3>
<a name="GScannerConfig"></a>GScannerConfig</h3>
<a class="indexterm" name="id3138545"></a><pre class="programlisting">typedef struct {
  /* Character sets
   */
  gchar		*cset_skip_characters;		/* default: " \t\n" */
  gchar		*cset_identifier_first;
  gchar		*cset_identifier_nth;
  gchar		*cpair_comment_single;		/* default: "#\n" */
  
  /* Should symbol lookup work case sensitive?
   */
  guint		case_sensitive : 1;
  
  /* Boolean values to be adjusted "on the fly"
   * to configure scanning behaviour.
   */
  guint		skip_comment_multi : 1;		/* C like comment */
  guint		skip_comment_single : 1;	/* single line comment */
  guint		scan_comment_multi : 1;		/* scan multi line comments? */
  guint		scan_identifier : 1;
  guint		scan_identifier_1char : 1;
  guint		scan_identifier_NULL : 1;
  guint		scan_symbols : 1;
  guint		scan_binary : 1;
  guint		scan_octal : 1;
  guint		scan_float : 1;
  guint		scan_hex : 1;			/* `0x0ff0' */
  guint		scan_hex_dollar : 1;		/* `$0ff0' */
  guint		scan_string_sq : 1;		/* string: 'anything' */
  guint		scan_string_dq : 1;		/* string: "\\-escapes!\n" */
  guint		numbers_2_int : 1;		/* bin, octal, hex =&gt; int */
  guint		int_2_float : 1;		/* int =&gt; G_TOKEN_FLOAT? */
  guint		identifier_2_string : 1;
  guint		char_2_token : 1;		/* return G_TOKEN_CHAR? */
  guint		symbol_2_token : 1;
  guint		scope_0_fallback : 1;		/* try scope 0 on lookups? */
  guint		store_int64 : 1; 		/* use value.v_int64 rather than v_int */
  guint		padding_dummy;
} GScannerConfig;
</pre>
<p>
Specifies the <a class="link" href="glib-Lexical-Scanner.html#GScanner"><span class="type">GScanner</span></a> parser configuration. Most settings can be changed during
the parsing phase and will affect the lexical parsing of the next unpeeked token.
</p>
<p>
<em class="structfield"><code>cset_skip_characters</code></em> specifies which characters
should be skipped by the scanner (the default is the whitespace characters:
space, tab, carriage-return and line-feed).
</p>
<p>
<em class="structfield"><code>cset_identifier_first</code></em> specifies the characters
which can start identifiers (the default is <a class="link" href="glib-Lexical-Scanner.html#G-CSET-a-2-z"><span class="type">G_CSET_a_2_z</span></a>, "_", and 
<a class="link" href="glib-Lexical-Scanner.html#G-CSET-A-2-Z:CAPS"><span class="type">G_CSET_A_2_Z</span></a>).
</p>
<p>
<em class="structfield"><code>cset_identifier_nth</code></em> specifies the characters
which can be used in identifiers, after the first character (the default 
is <a class="link" href="glib-Lexical-Scanner.html#G-CSET-a-2-z"><span class="type">G_CSET_a_2_z</span></a>, "_0123456789", <a class="link" href="glib-Lexical-Scanner.html#G-CSET-A-2-Z:CAPS"><span class="type">G_CSET_A_2_Z</span></a>, <a class="link" href="glib-Lexical-Scanner.html#G-CSET-LATINS:CAPS"><span class="type">G_CSET_LATINS</span></a>,
<a class="link" href="glib-Lexical-Scanner.html#G-CSET-LATINC:CAPS"><span class="type">G_CSET_LATINC</span></a>).
</p>
<p>
<em class="structfield"><code>cpair_comment_single</code></em> specifies the characters
at the start and end of single-line comments. The default is "#\n" which
means that single-line comments start with a '#' and continue until a '\n'
(end of line).
</p>
<p>
<em class="structfield"><code>case_sensitive</code></em> specifies if symbols are
case sensitive (the default is <a class="link" href="glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a>).
</p>
<p>
<em class="structfield"><code>skip_comment_multi</code></em> specifies if multi-line
comments are skipped and not returned as tokens (the default is <a class="link" href="glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a>).
</p>
<p>
<em class="structfield"><code>skip_comment_single</code></em> specifies if single-line
comments are skipped and not returned as tokens (the default is <a class="link" href="glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a>).
</p>
<p>
<em class="structfield"><code>scan_comment_multi</code></em> specifies if multi-line
comments are recognized (the default is <a class="link" href="glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a>).
</p>
<p>
<em class="structfield"><code>scan_identifier</code></em> specifies if identifiers
are recognized (the default is <a class="link" href="glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a>).
</p>
<p>
<em class="structfield"><code>scan_identifier_1char</code></em> specifies if single-character
identifiers are recognized (the default is <a class="link" href="glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a>).
</p>
<p>
<em class="structfield"><code>scan_identifier_NULL</code></em> specifies if 
<code class="literal">NULL</code> is reported as <span class="type">G_TOKEN_IDENTIFIER_NULL</span>.
(the default is <a class="link" href="glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a>).
</p>
<p>
<em class="structfield"><code>scan_symbols</code></em> specifies if symbols are
recognized (the default is <a class="link" href="glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a>).
</p>
<p>
<em class="structfield"><code>scan_binary</code></em> specifies if binary numbers
are recognized (the default is <a class="link" href="glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a>).
</p>
<p>
<em class="structfield"><code>scan_octal</code></em> specifies if octal numbers
are recognized (the default is <a class="link" href="glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a>).
</p>
<p>
<em class="structfield"><code>scan_float</code></em> specifies if floating point numbers
are recognized (the default is <a class="link" href="glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a>).
</p>
<p>
<em class="structfield"><code>scan_hex</code></em> specifies if hexadecimal numbers
are recognized (the default is <a class="link" href="glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a>).
</p>
<p>
<em class="structfield"><code>scan_hex_dollar</code></em> specifies if '$' is recognized
as a prefix for hexadecimal numbers (the default is <a class="link" href="glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a>).
</p>
<p>
<em class="structfield"><code>scan_string_sq</code></em> specifies if strings can be
enclosed in single quotes (the default is <a class="link" href="glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a>).
</p>
<p>
<em class="structfield"><code>scan_string_dq</code></em> specifies if strings can be
enclosed in double quotes (the default is <a class="link" href="glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a>).
</p>
<p>
<em class="structfield"><code>numbers_2_int</code></em> specifies if binary, octal and
hexadecimal numbers are reported as <span class="type">G_TOKEN_INT</span> (the default is <a class="link" href="glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a>).
</p>
<p>
<em class="structfield"><code>int_2_float</code></em> specifies if all numbers are 
reported as <span class="type">G_TOKEN_FLOAT</span> (the default is <a class="link" href="glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a>).
</p>
<p>
<em class="structfield"><code>identifier_2_string</code></em> specifies if identifiers
are reported as strings (the default is <a class="link" href="glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a>).
</p>
<p>
<em class="structfield"><code>char_2_token</code></em> specifies if characters
are reported by setting <code class="literal">token = ch</code> or as <span class="type">G_TOKEN_CHAR</span> 
(the default is <a class="link" href="glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a>).
</p>
<p>
<em class="structfield"><code>symbol_2_token</code></em> specifies if symbols 
are reported by setting <code class="literal">token = v_symbol</code> or as
<span class="type">G_TOKEN_SYMBOL</span> (the default is <a class="link" href="glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a>).
</p>
<p>
<em class="structfield"><code>scope_0_fallback</code></em> specifies if a symbol 
is searched for in the default scope in addition to the current scope
(the default is <a class="link" href="glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a>).
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3139138"></a><h3>
<a name="g-scanner-new"></a>g_scanner_new ()</h3>
<a class="indexterm" name="id3139151"></a><pre class="programlisting"><a class="link" href="glib-Lexical-Scanner.html#GScanner">GScanner</a>*           g_scanner_new                       (const <a class="link" href="glib-Lexical-Scanner.html#GScannerConfig">GScannerConfig</a> *config_templ);</pre>
<p>
Creates a new <a class="link" href="glib-Lexical-Scanner.html#GScanner"><span class="type">GScanner</span></a>.
The <em class="parameter"><code>config_templ</code></em> structure specifies the initial settings of the scanner,
which are copied into the <a class="link" href="glib-Lexical-Scanner.html#GScanner"><span class="type">GScanner</span></a> <em class="structfield"><code>config</code></em> field.
If you pass <a class="link" href="glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> then the default settings are used.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>config_templ</code></em>&#160;:</span></p></td>
<td>the initial scanner settings.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
<td>the new <a class="link" href="glib-Lexical-Scanner.html#GScanner"><span class="type">GScanner</span></a>.


</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3139256"></a><h3>
<a name="g-scanner-destroy"></a>g_scanner_destroy ()</h3>
<a class="indexterm" name="id3139269"></a><pre class="programlisting">void                g_scanner_destroy                   (<a class="link" href="glib-Lexical-Scanner.html#GScanner">GScanner</a> *scanner);</pre>
<p>
Frees all memory used by the <a class="link" href="glib-Lexical-Scanner.html#GScanner"><span class="type">GScanner</span></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>scanner</code></em>&#160;:</span></p></td>
<td>a <a class="link" href="glib-Lexical-Scanner.html#GScanner"><span class="type">GScanner</span></a>.


</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3139331"></a><h3>
<a name="g-scanner-input-file"></a>g_scanner_input_file ()</h3>
<a class="indexterm" name="id3139345"></a><pre class="programlisting">void                g_scanner_input_file                (<a class="link" href="glib-Lexical-Scanner.html#GScanner">GScanner</a> *scanner,
                                                         <a class="link" href="glib-Basic-Types.html#gint">gint</a> input_fd);</pre>
<p>
Prepares to scan a file.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>scanner</code></em>&#160;:</span></p></td>
<td>a <a class="link" href="glib-Lexical-Scanner.html#GScanner"><span class="type">GScanner</span></a>.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>input_fd</code></em>&#160;:</span></p></td>
<td>a file descriptor.


</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3139421"></a><h3>
<a name="g-scanner-sync-file-offset"></a>g_scanner_sync_file_offset ()</h3>
<a class="indexterm" name="id3139435"></a><pre class="programlisting">void                g_scanner_sync_file_offset          (<a class="link" href="glib-Lexical-Scanner.html#GScanner">GScanner</a> *scanner);</pre>
<p>
Rewinds the filedescriptor to the current buffer position and blows 
the file read ahead buffer. This is useful for third party uses of
the scanners filedescriptor, which hooks onto the current scanning 
position.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>scanner</code></em>&#160;:</span></p></td>
<td>a <a class="link" href="glib-Lexical-Scanner.html#GScanner"><span class="type">GScanner</span></a>.


</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3139492"></a><h3>
<a name="g-scanner-input-text"></a>g_scanner_input_text ()</h3>
<a class="indexterm" name="id3139505"></a><pre class="programlisting">void                g_scanner_input_text                (<a class="link" href="glib-Lexical-Scanner.html#GScanner">GScanner</a> *scanner,
                                                         const <a class="link" href="glib-Basic-Types.html#gchar">gchar</a> *text,
                                                         <a class="link" href="glib-Basic-Types.html#guint">guint</a> text_len);</pre>
<p>
Prepares to scan a text buffer.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>scanner</code></em>&#160;:</span></p></td>
<td>a <a class="link" href="glib-Lexical-Scanner.html#GScanner"><span class="type">GScanner</span></a>.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>text</code></em>&#160;:</span></p></td>
<td>the text buffer to scan.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>text_len</code></em>&#160;:</span></p></td>
<td>the length of the text buffer.


</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3139604"></a><h3>
<a name="g-scanner-peek-next-token"></a>g_scanner_peek_next_token ()</h3>
<a class="indexterm" name="id3139618"></a><pre class="programlisting"><a class="link" href="glib-Lexical-Scanner.html#GTokenType">GTokenType</a>          g_scanner_peek_next_token           (<a class="link" href="glib-Lexical-Scanner.html#GScanner">GScanner</a> *scanner);</pre>
<p>
Parses the next token, without removing it from the input stream.
The token data is placed in the
<em class="structfield"><code>next_token</code></em>,
<em class="structfield"><code>next_value</code></em>,
<em class="structfield"><code>next_line</code></em>, and
<em class="structfield"><code>next_position</code></em> fields of the <a class="link" href="glib-Lexical-Scanner.html#GScanner"><span class="type">GScanner</span></a> structure.
</p>
<p>
Note that, while the token is not removed from the input stream (i.e.
the next call to <a class="link" href="glib-Lexical-Scanner.html#g-scanner-get-next-token"><code class="function">g_scanner_get_next_token()</code></a> will return the same token),
it will not be reevaluated. This can lead to surprising results when
changing scope or the scanner configuration after peeking the next token.
Getting the next token after switching the scope or configuration will
return whatever was peeked before, regardless of any symbols that may
have been added or removed in the new scope. 
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>scanner</code></em>&#160;:</span></p></td>
<td>a <a class="link" href="glib-Lexical-Scanner.html#GScanner"><span class="type">GScanner</span></a>.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
<td>the type of the token.


</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3139728"></a><h3>
<a name="g-scanner-get-next-token"></a>g_scanner_get_next_token ()</h3>
<a class="indexterm" name="id3139741"></a><pre class="programlisting"><a class="link" href="glib-Lexical-Scanner.html#GTokenType">GTokenType</a>          g_scanner_get_next_token            (<a class="link" href="glib-Lexical-Scanner.html#GScanner">GScanner</a> *scanner);</pre>
<p>
Parses the next token just like <a class="link" href="glib-Lexical-Scanner.html#g-scanner-peek-next-token"><code class="function">g_scanner_peek_next_token()</code></a> and also
removes it from the input stream.
The token data is placed in the
<em class="structfield"><code>token</code></em>,
<em class="structfield"><code>value</code></em>,
<em class="structfield"><code>line</code></em>, and
<em class="structfield"><code>position</code></em> fields of the <a class="link" href="glib-Lexical-Scanner.html#GScanner"><span class="type">GScanner</span></a> structure.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>scanner</code></em>&#160;:</span></p></td>
<td>a <a class="link" href="glib-Lexical-Scanner.html#GScanner"><span class="type">GScanner</span></a>.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
<td>the type of the token.


</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3139841"></a><h3>
<a name="g-scanner-eof"></a>g_scanner_eof ()</h3>
<a class="indexterm" name="id3139854"></a><pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gboolean">gboolean</a>            g_scanner_eof                       (<a class="link" href="glib-Lexical-Scanner.html#GScanner">GScanner</a> *scanner);</pre>
<p>
Returns <a class="link" href="glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the scanner has reached the end of the file or text buffer.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>scanner</code></em>&#160;:</span></p></td>
<td>a <a class="link" href="glib-Lexical-Scanner.html#GScanner"><span class="type">GScanner</span></a>.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
<td>
<a class="link" href="glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the scanner has reached the end of the file or text buffer.


</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3139939"></a><h3>
<a name="g-scanner-cur-line"></a>g_scanner_cur_line ()</h3>
<a class="indexterm" name="id3139952"></a><pre class="programlisting"><a class="link" href="glib-Basic-Types.html#guint">guint</a>               g_scanner_cur_line                  (<a class="link" href="glib-Lexical-Scanner.html#GScanner">GScanner</a> *scanner);</pre>
<p>
Returns the current line in the input stream (counting from 1).
This is the line of the last token parsed via <a class="link" href="glib-Lexical-Scanner.html#g-scanner-get-next-token"><code class="function">g_scanner_get_next_token()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>scanner</code></em>&#160;:</span></p></td>
<td>a <a class="link" href="glib-Lexical-Scanner.html#GScanner"><span class="type">GScanner</span></a>.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
<td>the current line.


</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3140029"></a><h3>
<a name="g-scanner-cur-position"></a>g_scanner_cur_position ()</h3>
<a class="indexterm" name="id3140042"></a><pre class="programlisting"><a class="link" href="glib-Basic-Types.html#guint">guint</a>               g_scanner_cur_position              (<a class="link" href="glib-Lexical-Scanner.html#GScanner">GScanner</a> *scanner);</pre>
<p>
Returns the current position in the current line (counting from 0).
This is the position of the last token parsed via <a class="link" href="glib-Lexical-Scanner.html#g-scanner-get-next-token"><code class="function">g_scanner_get_next_token()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>scanner</code></em>&#160;:</span></p></td>
<td>a <a class="link" href="glib-Lexical-Scanner.html#GScanner"><span class="type">GScanner</span></a>.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
<td>the current position on the line.


</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3140120"></a><h3>
<a name="g-scanner-cur-token"></a>g_scanner_cur_token ()</h3>
<a class="indexterm" name="id3140133"></a><pre class="programlisting"><a class="link" href="glib-Lexical-Scanner.html#GTokenType">GTokenType</a>          g_scanner_cur_token                 (<a class="link" href="glib-Lexical-Scanner.html#GScanner">GScanner</a> *scanner);</pre>
<p>
Gets the current token type.
This is simply the <em class="structfield"><code>token</code></em> field in the <a class="link" href="glib-Lexical-Scanner.html#GScanner"><span class="type">GScanner</span></a>
structure.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>scanner</code></em>&#160;:</span></p></td>
<td>a <a class="link" href="glib-Lexical-Scanner.html#GScanner"><span class="type">GScanner</span></a>.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
<td>the current token type.


</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3140210"></a><h3>
<a name="g-scanner-cur-value"></a>g_scanner_cur_value ()</h3>
<a class="indexterm" name="id3140222"></a><pre class="programlisting"><a class="link" href="glib-Lexical-Scanner.html#GTokenValue">GTokenValue</a>         g_scanner_cur_value                 (<a class="link" href="glib-Lexical-Scanner.html#GScanner">GScanner</a> *scanner);</pre>
<p>
Gets the current token value.
This is simply the <em class="structfield"><code>value</code></em> field in the <a class="link" href="glib-Lexical-Scanner.html#GScanner"><span class="type">GScanner</span></a>
structure.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>scanner</code></em>&#160;:</span></p></td>
<td>a <a class="link" href="glib-Lexical-Scanner.html#GScanner"><span class="type">GScanner</span></a>.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
<td>the current token value.


</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3140299"></a><h3>
<a name="g-scanner-set-scope"></a>g_scanner_set_scope ()</h3>
<a class="indexterm" name="id3140312"></a><pre class="programlisting"><a class="link" href="glib-Basic-Types.html#guint">guint</a>               g_scanner_set_scope                 (<a class="link" href="glib-Lexical-Scanner.html#GScanner">GScanner</a> *scanner,
                                                         <a class="link" href="glib-Basic-Types.html#guint">guint</a> scope_id);</pre>
<p>
Sets the current scope.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>scanner</code></em>&#160;:</span></p></td>
<td>a <a class="link" href="glib-Lexical-Scanner.html#GScanner"><span class="type">GScanner</span></a>.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>scope_id</code></em>&#160;:</span></p></td>
<td>the new scope id.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
<td>the old scope id.


</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3140399"></a><h3>
<a name="g-scanner-scope-add-symbol"></a>g_scanner_scope_add_symbol ()</h3>
<a class="indexterm" name="id3140413"></a><pre class="programlisting">void                g_scanner_scope_add_symbol          (<a class="link" href="glib-Lexical-Scanner.html#GScanner">GScanner</a> *scanner,
                                                         <a class="link" href="glib-Basic-Types.html#guint">guint</a> scope_id,
                                                         const <a class="link" href="glib-Basic-Types.html#gchar">gchar</a> *symbol,
                                                         <a class="link" href="glib-Basic-Types.html#gpointer">gpointer</a> value);</pre>
<p>
Adds a symbol to the given scope.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>scanner</code></em>&#160;:</span></p></td>
<td>a <a class="link" href="glib-Lexical-Scanner.html#GScanner"><span class="type">GScanner</span></a>.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>scope_id</code></em>&#160;:</span></p></td>
<td>the scope id.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>symbol</code></em>&#160;:</span></p></td>
<td>the symbol to add.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>value</code></em>&#160;:</span></p></td>
<td>the value of the symbol.


</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3140533"></a><h3>
<a name="g-scanner-scope-foreach-symbol"></a>g_scanner_scope_foreach_symbol ()</h3>
<a class="indexterm" name="id3140546"></a><pre class="programlisting">void                g_scanner_scope_foreach_symbol      (<a class="link" href="glib-Lexical-Scanner.html#GScanner">GScanner</a> *scanner,
                                                         <a class="link" href="glib-Basic-Types.html#guint">guint</a> scope_id,
                                                         <a class="link" href="glib-Hash-Tables.html#GHFunc">GHFunc</a> func,
                                                         <a class="link" href="glib-Basic-Types.html#gpointer">gpointer</a> user_data);</pre>
<p>
Calls the given function for each of the symbol/value pairs in the 
given scope of the <a class="link" href="glib-Lexical-Scanner.html#GScanner"><span class="type">GScanner</span></a>. The function is passed the symbol and 
value of each pair, and the given <em class="parameter"><code>user_data</code></em> parameter.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>scanner</code></em>&#160;:</span></p></td>
<td>a <a class="link" href="glib-Lexical-Scanner.html#GScanner"><span class="type">GScanner</span></a>.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>scope_id</code></em>&#160;:</span></p></td>
<td>the scope id.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>func</code></em>&#160;:</span></p></td>
<td>the function to call for each symbol/value pair.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>user_data</code></em>&#160;:</span></p></td>
<td>user data to pass to the function.


</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3140684"></a><h3>
<a name="g-scanner-scope-lookup-symbol"></a>g_scanner_scope_lookup_symbol ()</h3>
<a class="indexterm" name="id3140698"></a><pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gpointer">gpointer</a>            g_scanner_scope_lookup_symbol       (<a class="link" href="glib-Lexical-Scanner.html#GScanner">GScanner</a> *scanner,
                                                         <a class="link" href="glib-Basic-Types.html#guint">guint</a> scope_id,
                                                         const <a class="link" href="glib-Basic-Types.html#gchar">gchar</a> *symbol);</pre>
<p>
Looks up a symbol in a scope and return its value. If the
symbol is not bound in the scope, <a class="link" href="glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> is returned.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>scanner</code></em>&#160;:</span></p></td>
<td>a <a class="link" href="glib-Lexical-Scanner.html#GScanner"><span class="type">GScanner</span></a>.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>scope_id</code></em>&#160;:</span></p></td>
<td>the scope id.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>symbol</code></em>&#160;:</span></p></td>
<td>the symbol to look up.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
<td>the value of <em class="parameter"><code>symbol</code></em> in the given scope, or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>
if <em class="parameter"><code>symbol</code></em> is not bound in the given scope.


</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3140841"></a><h3>
<a name="g-scanner-scope-remove-symbol"></a>g_scanner_scope_remove_symbol ()</h3>
<a class="indexterm" name="id3140854"></a><pre class="programlisting">void                g_scanner_scope_remove_symbol       (<a class="link" href="glib-Lexical-Scanner.html#GScanner">GScanner</a> *scanner,
                                                         <a class="link" href="glib-Basic-Types.html#guint">guint</a> scope_id,
                                                         const <a class="link" href="glib-Basic-Types.html#gchar">gchar</a> *symbol);</pre>
<p>
Removes a symbol from a scope.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>scanner</code></em>&#160;:</span></p></td>
<td>a <a class="link" href="glib-Lexical-Scanner.html#GScanner"><span class="type">GScanner</span></a>.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>scope_id</code></em>&#160;:</span></p></td>
<td>the scope id.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>symbol</code></em>&#160;:</span></p></td>
<td>the symbol to remove.


</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3140953"></a><h3>
<a name="g-scanner-add-symbol"></a>g_scanner_add_symbol()</h3>
<a class="indexterm" name="id3140969"></a><pre class="programlisting">#define             g_scanner_add_symbol( scanner, symbol, value )</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">g_scanner_add_symbol</code> has been deprecated since version 2.2 and should not be used in newly-written code. Use <a class="link" href="glib-Lexical-Scanner.html#g-scanner-scope-add-symbol"><code class="function">g_scanner_scope_add_symbol()</code></a> instead.</p>
</div>
<p>
Adds a symbol to the default scope.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>scanner</code></em>&#160;:</span></p></td>
<td>a <a class="link" href="glib-Lexical-Scanner.html#GScanner"><span class="type">GScanner</span></a>.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>symbol</code></em>&#160;:</span></p></td>
<td>the symbol to add.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>value</code></em>&#160;:</span></p></td>
<td>the value of the symbol.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3141064"></a><h3>
<a name="g-scanner-remove-symbol"></a>g_scanner_remove_symbol()</h3>
<a class="indexterm" name="id3141080"></a><pre class="programlisting">#define             g_scanner_remove_symbol( scanner, symbol )</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">g_scanner_remove_symbol</code> has been deprecated since version 2.2 and should not be used in newly-written code. Use <a class="link" href="glib-Lexical-Scanner.html#g-scanner-scope-remove-symbol"><code class="function">g_scanner_scope_remove_symbol()</code></a> instead.</p>
</div>
<p>
Removes a symbol from the default scope.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>scanner</code></em>&#160;:</span></p></td>
<td>a <a class="link" href="glib-Lexical-Scanner.html#GScanner"><span class="type">GScanner</span></a>.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>symbol</code></em>&#160;:</span></p></td>
<td>the symbol to remove.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3141161"></a><h3>
<a name="g-scanner-foreach-symbol"></a>g_scanner_foreach_symbol()</h3>
<a class="indexterm" name="id3141177"></a><pre class="programlisting">#define             g_scanner_foreach_symbol( scanner, func, data )</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">g_scanner_foreach_symbol</code> has been deprecated since version 2.2 and should not be used in newly-written code. Use <a class="link" href="glib-Lexical-Scanner.html#g-scanner-scope-foreach-symbol"><code class="function">g_scanner_scope_foreach_symbol()</code></a> instead.</p>
</div>
<p>
Calls a function for each symbol in the default scope.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>scanner</code></em>&#160;:</span></p></td>
<td>a <a class="link" href="glib-Lexical-Scanner.html#GScanner"><span class="type">GScanner</span></a>.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>func</code></em>&#160;:</span></p></td>
<td>the function to call with each symbol.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>data</code></em>&#160;:</span></p></td>
<td>data to pass to the function.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3141272"></a><h3>
<a name="g-scanner-freeze-symbol-table"></a>g_scanner_freeze_symbol_table()</h3>
<a class="indexterm" name="id3141288"></a><pre class="programlisting">#define             g_scanner_freeze_symbol_table(scanner)</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">g_scanner_freeze_symbol_table</code> has been deprecated since version 2.2 and should not be used in newly-written code. This macro does nothing.</p>
</div>
<p>
There is no reason to use this macro, since it does nothing.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>scanner</code></em>&#160;:</span></p></td>
<td>a <a class="link" href="glib-Lexical-Scanner.html#GScanner"><span class="type">GScanner</span></a>.
</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3141345"></a><h3>
<a name="g-scanner-thaw-symbol-table"></a>g_scanner_thaw_symbol_table()</h3>
<a class="indexterm" name="id3141362"></a><pre class="programlisting">#define             g_scanner_thaw_symbol_table(scanner)</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">g_scanner_thaw_symbol_table</code> has been deprecated since version 2.2 and should not be used in newly-written code. This macro does nothing.</p>
</div>
<p>
There is no reason to use this macro, since it does nothing.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>scanner</code></em>&#160;:</span></p></td>
<td>a <a class="link" href="glib-Lexical-Scanner.html#GScanner"><span class="type">GScanner</span></a>.
</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3141417"></a><h3>
<a name="g-scanner-lookup-symbol"></a>g_scanner_lookup_symbol ()</h3>
<a class="indexterm" name="id3141430"></a><pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gpointer">gpointer</a>            g_scanner_lookup_symbol             (<a class="link" href="glib-Lexical-Scanner.html#GScanner">GScanner</a> *scanner,
                                                         const <a class="link" href="glib-Basic-Types.html#gchar">gchar</a> *symbol);</pre>
<p>
Looks up a symbol in the current scope and return its value. If the
symbol is not bound in the current scope, <a class="link" href="glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> is returned.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>scanner</code></em>&#160;:</span></p></td>
<td>a <a class="link" href="glib-Lexical-Scanner.html#GScanner"><span class="type">GScanner</span></a>.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>symbol</code></em>&#160;:</span></p></td>
<td>the symbol to look up.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td>
<td>the value of <em class="parameter"><code>symbol</code></em> in the current scope, or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>
if <em class="parameter"><code>symbol</code></em> is not bound in the current scope.


</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3141552"></a><h3>
<a name="g-scanner-warn"></a>g_scanner_warn ()</h3>
<a class="indexterm" name="id3141564"></a><pre class="programlisting">void                g_scanner_warn                      (<a class="link" href="glib-Lexical-Scanner.html#GScanner">GScanner</a> *scanner,
                                                         const <a class="link" href="glib-Basic-Types.html#gchar">gchar</a> *format,
                                                         ...);</pre>
<p>
Outputs a warning message, via the <a class="link" href="glib-Lexical-Scanner.html#GScanner"><span class="type">GScanner</span></a> message handler.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>scanner</code></em>&#160;:</span></p></td>
<td>a <a class="link" href="glib-Lexical-Scanner.html#GScanner"><span class="type">GScanner</span></a>.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>format</code></em>&#160;:</span></p></td>
<td>the message format. See the <code class="function"><code class="function">printf()</code></code>
documentation.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>...</code></em>&#160;:</span></p></td>
<td>the parameters to insert into the format string.


</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3141681"></a><h3>
<a name="g-scanner-error"></a>g_scanner_error ()</h3>
<a class="indexterm" name="id3141694"></a><pre class="programlisting">void                g_scanner_error                     (<a class="link" href="glib-Lexical-Scanner.html#GScanner">GScanner</a> *scanner,
                                                         const <a class="link" href="glib-Basic-Types.html#gchar">gchar</a> *format,
                                                         ...);</pre>
<p>
Outputs an error message, via the <a class="link" href="glib-Lexical-Scanner.html#GScanner"><span class="type">GScanner</span></a> message handler.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>scanner</code></em>&#160;:</span></p></td>
<td>a <a class="link" href="glib-Lexical-Scanner.html#GScanner"><span class="type">GScanner</span></a>.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>format</code></em>&#160;:</span></p></td>
<td>the message format. See the <code class="function"><code class="function">printf()</code></code>
documentation.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>...</code></em>&#160;:</span></p></td>
<td>the parameters to insert into the format string.


</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3141808"></a><h3>
<a name="g-scanner-unexp-token"></a>g_scanner_unexp_token ()</h3>
<a class="indexterm" name="id3141821"></a><pre class="programlisting">void                g_scanner_unexp_token               (<a class="link" href="glib-Lexical-Scanner.html#GScanner">GScanner</a> *scanner,
                                                         <a class="link" href="glib-Lexical-Scanner.html#GTokenType">GTokenType</a> expected_token,
                                                         const <a class="link" href="glib-Basic-Types.html#gchar">gchar</a> *identifier_spec,
                                                         const <a class="link" href="glib-Basic-Types.html#gchar">gchar</a> *symbol_spec,
                                                         const <a class="link" href="glib-Basic-Types.html#gchar">gchar</a> *symbol_name,
                                                         const <a class="link" href="glib-Basic-Types.html#gchar">gchar</a> *message,
                                                         <a class="link" href="glib-Basic-Types.html#gint">gint</a> is_error);</pre>
<p>
Outputs a message through the scanner's msg_handler, resulting from an
unexpected token in the input stream.
Note that you should not call <a class="link" href="glib-Lexical-Scanner.html#g-scanner-peek-next-token"><code class="function">g_scanner_peek_next_token()</code></a> followed by
<a class="link" href="glib-Lexical-Scanner.html#g-scanner-unexp-token"><code class="function">g_scanner_unexp_token()</code></a> without an intermediate call to
<a class="link" href="glib-Lexical-Scanner.html#g-scanner-get-next-token"><code class="function">g_scanner_get_next_token()</code></a>, as <a class="link" href="glib-Lexical-Scanner.html#g-scanner-unexp-token"><code class="function">g_scanner_unexp_token()</code></a> evaluates the
scanner's current token (not the peeked token) to construct part
of the message.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>scanner</code></em>&#160;:</span></p></td>
<td>a <a class="link" href="glib-Lexical-Scanner.html#GScanner"><span class="type">GScanner</span></a>.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>expected_token</code></em>&#160;:</span></p></td>
<td>the expected token.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>identifier_spec</code></em>&#160;:</span></p></td>
<td>a string describing how the scanner's user refers to
                  identifiers (<a class="link" href="glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> defaults to "identifier").
                  This is used if <em class="parameter"><code>expected_token</code></em> is <span class="type">G_TOKEN_IDENTIFIER</span>
                  or <span class="type">G_TOKEN_IDENTIFIER_NULL</span>.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>symbol_spec</code></em>&#160;:</span></p></td>
<td>a string describing how the scanner's user refers to
              symbols (<a class="link" href="glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> defaults to "symbol").
              This is used if <em class="parameter"><code>expected_token</code></em> is <span class="type">G_TOKEN_SYMBOL</span> or
              any token value greater than <span class="type">G_TOKEN_LAST</span>.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>symbol_name</code></em>&#160;:</span></p></td>
<td>the name of the symbol, if the scanner's current token
              is a symbol.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>message</code></em>&#160;:</span></p></td>
<td>a message string to output at the end of the warning/error, or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>is_error</code></em>&#160;:</span></p></td>
<td>if <a class="link" href="glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> it is output as an error. If <a class="link" href="glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> it is output as a
           warning.


</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3142163"></a><h3>
<a name="GScannerMsgFunc"></a>GScannerMsgFunc ()</h3>
<a class="indexterm" name="id3142176"></a><pre class="programlisting">void                (*GScannerMsgFunc)                  (<a class="link" href="glib-Lexical-Scanner.html#GScanner">GScanner</a> *scanner,
                                                         <a class="link" href="glib-Basic-Types.html#gchar">gchar</a> *message,
                                                         <a class="link" href="glib-Basic-Types.html#gboolean">gboolean</a> error);</pre>
<p>
Specifies the type of the message handler function.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>scanner</code></em>&#160;:</span></p></td>
<td>a <a class="link" href="glib-Lexical-Scanner.html#GScanner"><span class="type">GScanner</span></a>.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>message</code></em>&#160;:</span></p></td>
<td>the message.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>error</code></em>&#160;:</span></p></td>
<td>
<a class="link" href="glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the message signals an error, <a class="link" href="glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> if it 
  signals a warning.


</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3142294"></a><h3>
<a name="G-CSET-a-2-z"></a>G_CSET_a_2_z</h3>
<a class="indexterm" name="id3142307"></a><pre class="programlisting">#define G_CSET_a_2_z	"abcdefghijklmnopqrstuvwxyz"
</pre>
<p>
The set of lowercase ASCII alphabet characters.
Used for specifying valid identifier characters in <a class="link" href="glib-Lexical-Scanner.html#GScannerConfig"><span class="type">GScannerConfig</span></a>.
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3142332"></a><h3>
<a name="G-CSET-A-2-Z:CAPS"></a>G_CSET_A_2_Z</h3>
<a class="indexterm" name="id3142345"></a><pre class="programlisting">#define G_CSET_A_2_Z	"ABCDEFGHIJKLMNOPQRSTUVWXYZ"
</pre>
<p>
The set of uppercase ASCII alphabet characters.
Used for specifying valid identifier characters in <a class="link" href="glib-Lexical-Scanner.html#GScannerConfig"><span class="type">GScannerConfig</span></a>.
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3142370"></a><h3>
<a name="G-CSET-DIGITS:CAPS"></a>G_CSET_DIGITS</h3>
<a class="indexterm" name="id3142383"></a><pre class="programlisting">#define G_CSET_DIGITS	"0123456789"
</pre>
<p>
The set of digits.
Used for specifying valid identifier characters in <a class="link" href="glib-Lexical-Scanner.html#GScannerConfig"><span class="type">GScannerConfig</span></a>.
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3142407"></a><h3>
<a name="G-CSET-LATINC:CAPS"></a>G_CSET_LATINC</h3>
<a class="indexterm" name="id3142420"></a><pre class="programlisting">#define             G_CSET_LATINC</pre>
<p>
The set of uppercase ISO 8859-1 alphabet characters which are 
not ASCII characters. 
Used for specifying valid identifier characters in <a class="link" href="glib-Lexical-Scanner.html#GScannerConfig"><span class="type">GScannerConfig</span></a>.
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3142446"></a><h3>
<a name="G-CSET-LATINS:CAPS"></a>G_CSET_LATINS</h3>
<a class="indexterm" name="id3142459"></a><pre class="programlisting">#define             G_CSET_LATINS</pre>
<p>
The set of lowercase ISO 8859-1 alphabet characters which are 
not ASCII characters. 
Used for specifying valid identifier characters in <a class="link" href="glib-Lexical-Scanner.html#GScannerConfig"><span class="type">GScannerConfig</span></a>.
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3142484"></a><h3>
<a name="GTokenType"></a>enum GTokenType</h3>
<a class="indexterm" name="id3142497"></a><pre class="programlisting">typedef enum
{
  G_TOKEN_EOF			=   0,
  
  G_TOKEN_LEFT_PAREN		= '(',
  G_TOKEN_RIGHT_PAREN		= ')',
  G_TOKEN_LEFT_CURLY		= '{',
  G_TOKEN_RIGHT_CURLY		= '}',
  G_TOKEN_LEFT_BRACE		= '[',
  G_TOKEN_RIGHT_BRACE		= ']',
  G_TOKEN_EQUAL_SIGN		= '=',
  G_TOKEN_COMMA			= ',',
  
  G_TOKEN_NONE			= 256,
  
  G_TOKEN_ERROR,
  
  G_TOKEN_CHAR,
  G_TOKEN_BINARY,
  G_TOKEN_OCTAL,
  G_TOKEN_INT,
  G_TOKEN_HEX,
  G_TOKEN_FLOAT,
  G_TOKEN_STRING,
  
  G_TOKEN_SYMBOL,
  G_TOKEN_IDENTIFIER,
  G_TOKEN_IDENTIFIER_NULL,
  
  G_TOKEN_COMMENT_SINGLE,
  G_TOKEN_COMMENT_MULTI,
  G_TOKEN_LAST
} GTokenType;
</pre>
<p>
The possible types of token returned from each <a class="link" href="glib-Lexical-Scanner.html#g-scanner-get-next-token"><code class="function">g_scanner_get_next_token()</code></a> call.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><a name="G-TOKEN-EOF:CAPS"></a><code class="literal">G_TOKEN_EOF</code></span></p></td>
<td>the end of the file.
</td>
</tr>
<tr>
<td><p><span class="term"><a name="G-TOKEN-LEFT-PAREN:CAPS"></a><code class="literal">G_TOKEN_LEFT_PAREN</code></span></p></td>
<td>a '(' character.
</td>
</tr>
<tr>
<td><p><span class="term"><a name="G-TOKEN-LEFT-CURLY:CAPS"></a><code class="literal">G_TOKEN_LEFT_CURLY</code></span></p></td>
<td>a '{' character.
</td>
</tr>
<tr>
<td><p><span class="term"><a name="G-TOKEN-RIGHT-CURLY:CAPS"></a><code class="literal">G_TOKEN_RIGHT_CURLY</code></span></p></td>
<td>a '}' character.

</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3142628"></a><h3>
<a name="GTokenValue"></a>union GTokenValue</h3>
<a class="indexterm" name="id3142640"></a><pre class="programlisting">union GTokenValue
{
  gpointer	v_symbol;
  gchar		*v_identifier;
  gulong	v_binary;
  gulong	v_octal;
  gulong	v_int;
  guint64       v_int64;
  gdouble	v_float;
  gulong	v_hex;
  gchar		*v_string;
  gchar		*v_comment;
  guchar	v_char;
  guint		v_error;
};
</pre>
<p>
A union holding the value of the token.
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id3142660"></a><h3>
<a name="GErrorType"></a>enum GErrorType</h3>
<a class="indexterm" name="id3142672"></a><pre class="programlisting">typedef enum
{
  G_ERR_UNKNOWN,
  G_ERR_UNEXP_EOF,
  G_ERR_UNEXP_EOF_IN_STRING,
  G_ERR_UNEXP_EOF_IN_COMMENT,
  G_ERR_NON_DIGIT_IN_CONST,
  G_ERR_DIGIT_RADIX,
  G_ERR_FLOAT_RADIX,
  G_ERR_FLOAT_MALFORMED
} GErrorType;
</pre>
<p>
The possible errors, used in the <em class="structfield"><code>v_error</code></em> field
of <a class="link" href="glib-Lexical-Scanner.html#GTokenValue"><span class="type">GTokenValue</span></a>, when the token is a <span class="type">G_TOKEN_ERROR</span>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><a name="G-ERR-UNKNOWN:CAPS"></a><code class="literal">G_ERR_UNKNOWN</code></span></p></td>
<td>unknown error.
</td>
</tr>
<tr>
<td><p><span class="term"><a name="G-ERR-UNEXP-EOF:CAPS"></a><code class="literal">G_ERR_UNEXP_EOF</code></span></p></td>
<td>unexpected end of file.
</td>
</tr>
<tr>
<td><p><span class="term"><a name="G-ERR-UNEXP-EOF-IN-STRING:CAPS"></a><code class="literal">G_ERR_UNEXP_EOF_IN_STRING</code></span></p></td>
<td>unterminated string constant.
</td>
</tr>
<tr>
<td><p><span class="term"><a name="G-ERR-UNEXP-EOF-IN-COMMENT:CAPS"></a><code class="literal">G_ERR_UNEXP_EOF_IN_COMMENT</code></span></p></td>
<td>unterminated comment.
</td>
</tr>
<tr>
<td><p><span class="term"><a name="G-ERR-NON-DIGIT-IN-CONST:CAPS"></a><code class="literal">G_ERR_NON_DIGIT_IN_CONST</code></span></p></td>
<td>non-digit character in a number.
</td>
</tr>
<tr>
<td><p><span class="term"><a name="G-ERR-DIGIT-RADIX:CAPS"></a><code class="literal">G_ERR_DIGIT_RADIX</code></span></p></td>
<td>digit beyond radix in a number.
</td>
</tr>
<tr>
<td><p><span class="term"><a name="G-ERR-FLOAT-RADIX:CAPS"></a><code class="literal">G_ERR_FLOAT_RADIX</code></span></p></td>
<td>non-decimal floating point number.
</td>
</tr>
<tr>
<td><p><span class="term"><a name="G-ERR-FLOAT-MALFORMED:CAPS"></a><code class="literal">G_ERR_FLOAT_MALFORMED</code></span></p></td>
<td>malformed floating point number.

</td>
</tr>
</tbody>
</table></div>
</div>
</div>
<div class="refsect1" lang="en">
<a name="id3142901"></a><div class="refsect2" lang="en"><a name="id3142902"></a></div>
<hr>
<div class="refsect2" lang="en"><a name="id3142903"></a></div>
</div>
</div>
</body>
</html>
